package cn.stylefeng.guns.modular.fruits.mapper;

import cn.stylefeng.guns.modular.fruits.entity.FruitsStorageStock;
import cn.stylefeng.guns.modular.fruits.model.params.FruitsStorageStockParam;
import cn.stylefeng.guns.modular.fruits.model.result.FruitsStorageStockResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 库存管理 Mapper 接口
 */
public interface FruitsStorageStockMapper extends BaseMapper<FruitsStorageStock> {

    /**
     * 获取列表
     *
     * @author zhucx
     * @Date 2022-06-15
     */
    List<FruitsStorageStockResult> customList(@Param("paramCondition") FruitsStorageStockParam paramCondition);

    /**
     * 获取map列表
     *
     * @author zhucx
     * @Date 2022-06-15
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") FruitsStorageStockParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zhucx
     * @Date 2022-06-15
     */
    Page<FruitsStorageStockResult> customPageList(@Param("page") Page page, @Param("paramCondition") FruitsStorageStockParam paramCondition, @Param("condition") String condition, @Param("operateId")Long operateId);

    /**
     * 获取分页map列表
     *
     * @author zhucx
     * @Date 2022-06-15
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") FruitsStorageStockParam paramCondition);

	FruitsStorageStockResult findBySpec(@Param("paramCondition")FruitsStorageStockParam param,@Param("operateId")Long operateId);

	List<FruitsStorageStockResult> findStorageStockSumBySpec(@Param("paramCondition")FruitsStorageStockParam param,@Param("operateId")Long operateId);

	List<FruitsStorageStockResult> findStorageStockSumBySpec2(@Param("paramCondition")FruitsStorageStockParam param,@Param("operateId")Long operateId);

	List<FruitsStorageStockResult> findStorageStockSumBySpec3(@Param("paramCondition")FruitsStorageStockParam param,@Param("operateId")Long operateId);

	List<FruitsStorageStockResult> findStorageStockSumBySpec4(@Param("paramCondition")FruitsStorageStockParam param,@Param("operateId")Long operateId);

	List<FruitsStorageStockResult> findStorageStockSum(@Param("paramCondition")FruitsStorageStockParam param);

	List<FruitsStorageStockResult> findListBySpec(@Param("paramCondition")FruitsStorageStockParam param,@Param("operateId")Long operateId);

	FruitsStorageStockResult findBySpecGt(@Param("paramCondition")FruitsStorageStockParam param,@Param("operateId")Long operateId);

	FruitsStorageStockResult findBySpecByPositionNumber(@Param("paramCondition")FruitsStorageStockParam param,@Param("operateId")Long operateId);

	List<FruitsStorageStockResult> findListBySpecAndPositionNumber(@Param("paramCondition")FruitsStorageStockParam param,@Param("operateId")Long operateId);

}
